package cn.tedu.autoshow.passport.mapper;

import cn.tedu.autoshow.passport.pojo.entity.AdminRole;
import cn.tedu.autoshow.passport.pojo.entity.RolePermission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RolePermissionMapper extends BaseMapper<RolePermission> {

    int insertBatch(RolePermission[] rolePermissionArray);

    int deleteByRoleId(Long roleId);

    int deletePermissionByRole(Long roleId,Long[] permissionIds);

    int deleteRoleByPermission(Long permissionId,Long[] roleIds);

    List<RolePermission> permissionListByRoleId(Long roleId);

    List<RolePermission> roleListByPermissionId(Long permissionId);

}
